<?php
	$css_list[0]['url'] = './tpl/css/article.css';
?>
<!--{template inc/header_n}-->

<div class="main_warp">
    <div class="inventory">
        <!--{template inc/list/list_menu}-->

        <div class="i_righter">
            <div style="margin-top:10px;">
                <p>
                    {if $_FANWE['user']['bossid']>0}<a class="g_btn1" href="/list.php?action=workplan&op=add">发布计划</a>{/if}
                    <a class="g_btn1" href="/list.php?action=workplan{if isset($_GET['boss'])}&boss{/if}{if isset($_GET['uid'])}&uid={$uid}{/if}&sj=today">今日计划</a>
                    <a class="g_btn1" href="/list.php?action=workplan{if isset($_GET['boss'])}&boss{/if}{if isset($_GET['uid'])}&uid={$uid}{/if}&sj=tomorrow">明日计划</a>
                    <a class="g_btn1" href="/list.php?action=workplan{if isset($_GET['boss'])}&boss{/if}{if isset($_GET['uid'])}&uid={$uid}{/if}&sj=all">所有计划</a>
                </p>
                <br/>
                <table class="table_list" width="100%" cellspacing="1" border="0">
                    {loop $workplan_list $v}
                    <tr>
                        <td><a href="/list.php?action=workplan&op=show&id={$v['id']}">{$v['title']}</a></td>
                        {if $shownames}
                        <td>{$shownames[$v['uid']]}</td>
                        {/if}
                        <td><?php echo date('Y-m-d', $v['sj']);?></td>
                        <td>
                            {if $v['flag'] == 0}
                            <span style="color:blue;">未审核</span>
                            {elseif $v['flag'] == 1}
                            <span style="color:red;">未完成</span>
                            {else}
                            <span style="color:green;">已完成</span>
                            {/if}
                        </td>
                        <td>
                            {if $v['flag'] == 0}
                            {if $_FANWE['user']['bossid'] > 0}
                            -
                            {else}
                            <a href="/list.php?action=workplan&op=setflag&flag=1&id={$v['id']}&uid={$v['uid']}">通过审核</a>
                            {/if}
                            {elseif $v['flag'] == 1}
                            <a href="/list.php?action=workplan&op=setflag&flag=2&id={$v['id']}&uid={$v['uid']}">确认完成</a>
                            {else}
                            {if $_FANWE['user']['bossid'] > 0}
                            -
                            {else}
                            <a href="/list.php?action=workplan&op=setflag&flag=1&id={$v['id']}&uid={$v['uid']}">尚未完成</a>
                            {/if}
                            {/if}</td>
                    </tr>
                    {/loop}
                </table>
            </div>
        </div>
        <br class="g_clear" />
</div>



<!--{template inc/footer}-->